//
//  YXTNetworking.h
//  daxue
//
//  Created by hanjun on 16/3/22.
//  Copyright © 2016年 cn.yunxuetang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

typedef NS_ENUM(NSInteger, RequestType){
    RequestTypePost = 1,
    RequestTypeGet = 2,
    RequestTypeDelete = 3,
    RequestTypePut = 4,
};

typedef NS_ENUM(NSInteger, PlatformType){
    PlatformTypeLeCaiVIP = 1,
    PlatformTypeLeCai = 2,
    PlatformTypeWebSchool = 3,
    PlatformTypePaperIM = 4,
};

typedef NS_ENUM(NSInteger, APIEnvironment){
    APIEnvironmentDevelopment = 0,
    APIEnvironmentProduction = 1
};

@interface YXTNetworking : NSObject

+ (id)getInstance;

- (void)configPlatform:(PlatformType)platformType apiEnvironment:(APIEnvironment)apiEnvironment orgCode:(NSString *)orgCode;

#pragma mark --系统相关
#pragma mark ----获取机构tabbar显示个数
- (void)appTabbarWithOrgId:(NSString *)orgId success:(void (^)(NSURLSessionDataTask *task,id response))success
                           failure:(void (^)(id err))failure;

#pragma mark ----检查app版本号
- (void)checkAppVersionWithSuccess:(void (^)(NSURLSessionDataTask *task,id response))success
                         failure:(void (^)(id err))failure;

#pragma mark ----crashlog 上传服务器
- (void)crashlogUploadServer:(NSDictionary *)crashInfo success:(void (^)(NSURLSessionDataTask *task,id response))success
            failure:(void (^)(id err))failure;

#pragma mark --用户系统
#pragma mark ----用户信息
- (void)userInfoWithSuccess:(void (^)(NSURLSessionDataTask *task,id response))success
                           failure:(void (^)(id err))failure;

#pragma mark ----检查用户token有效性
- (void)mobileLogin:(NSDictionary *)userInfo success:(void (^)(NSURLSessionDataTask *task,id response))success
                    failure:(void (^)(id err))failure;

#pragma mark --检查用户token 是否过期(小乐才)
- (void)checkUserToken:(void (^)(NSURLSessionDataTask *task,id response))success
               failure:(void (^)(id err))failure;

#pragma mark ----是否存在未读消息
- (void)isExistingUnreadMessageWithSuccess:(void (^)(NSURLSessionDataTask *task,id response))success failure:(void (^)(id err))failure;

#pragma mark ----用户是否能下载知识权限
- (void)knowledgeDownloadAuthoritySuccess:(void (^)(NSURLSessionDataTask *task,id response))success failure:(void (^)(id err))failure;

#pragma mark --学习
#pragma mark --知识信息
- (void)knowledgeInfo:(NSDictionary *)knowledgeInfo success:(void (^)(NSURLSessionDataTask *task,id response))success
              failure:(void (^)(id err))failure;

#pragma mark --提交学分
- (void)submitCredit:(NSDictionary *)creditInfo success:(void (^)(NSURLSessionDataTask *task,id response))success
            failure:(void (^)(id err))failure;

#pragma mark --播放器更新播放次数
- (void)playerUpdatePlayTimes:(NSString *)knowledgeId success:(void (^)(NSURLSessionDataTask *task,id response))success
             failure:(void (^)(id err))failure;

#pragma mark --提交评论
- (void)submitComment:(NSDictionary *)commentInfo success:(void (^)(NSURLSessionDataTask *task,id response))success
             failure:(void (^)(id err))failure;

#pragma mark ----评论checkMark
- (void)commentCheckMark:(NSString *)knowledgeId success:(void (^)(NSURLSessionDataTask *task,id response))success
            failure:(void (^)(id err))failure;

#pragma mark ----收藏
- (void)collectKnowledge:(NSDictionary *)knowledgeInfo success:(void (^)(NSURLSessionDataTask *task,id response))success
              failure:(void (^)(id err))failure;

#pragma mark ----取消收藏
- (void)cancelCollectKnowledge:(NSString *)knowledgeId success:(void (^)(NSURLSessionDataTask *task,id response))success
                       failure:(void (^)(id err))failure;

#pragma mark --图片处理
#pragma mark --获取qiniu token
- (void)getQiniuTokenWithSuccess:(void (^)(NSURLSessionDataTask *task,id response))success
                    failure:(void (^)(id err))failure;

#pragma mark --上传用户头像
- (void)uploadUserPhoto:(NSString *)photoUrl success:(void (^)(NSURLSessionDataTask *task,id response))success
                failure:(void (^)(id err))failure;

#pragma mark --会议
#pragma mark ----获取用户相关信息
- (void)getMeetingAccountRelateWithSuccess:(void (^)(NSURLSessionDataTask *task,id response))success
                             failure:(void (^)(id err))failure;
#pragma mark ----获取会汇账号信息
- (void)getMeetingAccountWithSuccess:(void (^)(NSURLSessionDataTask *task,id response))success
              failure:(void (^)(id err))failure;

#pragma mark ----获取安排会议列表
- (void)meetingListWithSuccess:(void (^)(NSURLSessionDataTask *task,id response))success
                       failure:(void (^)(id err))failure;
#pragma mark ----删除会议
- (void)meetingDeleteWithMeetingId:(NSString *)meetingId success:(void (^)(NSURLSessionDataTask *task,id response))success
                       failure:(void (^)(id err))failure;
#pragma mark ----会议是否超过并发
- (void)meetingConcurrentBeyondWithMeetingId:(NSString *)meetingId success:(void (^)(NSURLSessionDataTask *task,id response))success
                                     failure:(void (^)(id err))failure;
#pragma mark ----创建会议
- (void)meetingCreateWithSuccess:(void (^)(NSURLSessionDataTask *task,id response))success
                                     failure:(void (^)(id err))failure;

#pragma mark ----获取公共会议室列表
- (void)meetingPublicRoomList:(void (^)(NSURLSessionDataTask *task,id response))success failure:(void (^)(id err))failure;

#pragma mark ----搜索指定公共会议室列表
- (void)searchPublicRoomList:(NSDictionary *)searchInfo success:(void (^)(NSURLSessionDataTask *task,id response))success failure:(void (^)(id err))failure;

#pragma mark ----修改会议室名字
- (void)roomNameUpdate:(NSDictionary *)roomInfo success:(void (^)(NSURLSessionDataTask *task,id response))success failure:(void (^)(id err))failure;

@end
